//by 33hao invite
$(function(){
	var key = getCookie('key');
	var storeid = getCookie('sqstoreid');
	if (!key || !storeid) {
		window.location.href = '/sq/login.html';
	}
	$.ajax({
		type: 'post',
		url: ApiUrl + "/index.php?act=store&op=offline_store_qrcode",
		data: {key: key,store_id:storeid},
		dataType: 'json',
		//jsonp:'callback',
		success: function (result) {
			 console.log(result);
			// checkLogin(result.login);
			// $('#username').html(result.datas.member_info.user_name);
			// $('#myurl').val(result.datas.member_info.myurl);
			$('#myqrcode').attr("src", result.datas.store_info.qrcode);
			$("#store_name").html(result.datas.store_info.store_name);
			// $('#avatar').attr("src",result.datas.member_info.avator);
			return false;
		}
	})
});